package com.itheima.mall.service.impl;

import com.itheima.mall.mapper.OmsOrderSettingMapper;
import com.itheima.mall.pojo.OrderSetting;
import com.itheima.mall.service.OmsOrderSettingService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class OmsOrderSettingImpl implements OmsOrderSettingService {
@Resource
private OmsOrderSettingMapper omsOrderSettingMapper;
    /**
     * 修改指定订单设置
     * @param id
     * @param orderSetting
     * @return
     */
    public int update(Long id, OrderSetting orderSetting) {
        int i = omsOrderSettingMapper.updateById(orderSetting);
        return i;
    }

    /**
     * 获取指定订单设置
     * @param id
     * @return
     */
    @Override
    public OrderSetting getById(Long id) {
       return omsOrderSettingMapper.selectById(id);
    }
}
